﻿@model IEnumerable<GAE_PI.View_ActiviteEleve>
@{
    ViewBag.Title = "ActiviteEleve";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Activités de @Model.First().username</h2>
<table id="listGrid">
    <thead>
        <tr>
            <th>
            </th>
            <th>
                Activités
            </th>
            <th>
                Périodes
            </th>
            <th>
                Prix
            </th>
        </tr>
    </thead>
    <tbody>@{
        
        double prix=0;
    }
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink("Details", "DetailActivite", "DetailActivite", item, new { @class = "link" })
                </td>
                <td>
                    @item.nomA
                </td>
                <td>
                    @item.pStart au @item.pEnd
                </td>
                <td>
                    @item.prix
                    @{
            prix += (double)item.prix;
                    }
                </td>
            </tr>
        }
                    <tr>
                <td>
                    
                </td>
                <td>
                    
                </td>
                <td>
                    
                </td>
                <td>
                    <b>@prix</b>
                </td>
            </tr>
    </tbody>
</table>
<script type="text/javascript">
    $(document).ready(function () {
        $("#listGrid").wijgrid({ allowSorting: true, allowPaging: false });
    });
</script>
